<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>rotate旋转</title>
  </head>
  <style>
    /* 
    rotate旋转：
      deg:degree度数
     */
    .div1 {
      width: 100px;
      height: 100px;
      background-color: pink;
      margin: 100px auto;
      transition: transform 2s;
      transform-origin: center center;
      /* transform-origin: left top; */
    }

    .div1:hover {
      transform: rotate(45deg)
    }
  </style>

  <body>
    <div class="div1">div1</div>
  </body>

</html>